package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author ding
 * @since 2021-02-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_wx_red_packet")
public class WxRedPacketDo extends Model<WxRedPacketDo> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("wx_id")
    private Long wxId;

    @TableField("open_id")
    private String openId;

    @TableField("real_name")
    private String realName;

    /**
     * 中奖金额
     */
    @TableField("amount")
    private Integer amount;

    /**
     * 0 未领取 1 已领取
     */
    @TableField("pay_flag")
    private Integer payFlag;
    /**
     * 0 未完成 1 已完成
     */
    @TableField("finish_flag")
    private Integer finishFlag;

    @TableField("create_time")
    private Date createTime;

    @TableField("pay_time")
    private Date payTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
